package com.freecloud.whispered.auth.repository;

import com.freecloud.framework.repository.BaseDao;
import com.freecloud.whispered.auth.entity.SysRoleEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色管理
 * 
 * @author maomao
 * @email 138383877@qq.com
 */
@Repository
public interface SysRoleDao extends BaseDao<SysRoleEntity,Long> {
	
	/**
	 * 查询用户创建的角色ID列表
	 */
	@Query(value = "select role_id from sys_role where create_user_id = :createUserId ",nativeQuery = true)
	List<Long> queryRoleIdList(@Param("createUserId") Long createUserId);
}
